# Contributor: Daniel Sabogal <dsabogalcc@gmail.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=msgpack-c
_pkgname=msgpack-c-cpp
pkgver=3.2.1
pkgrel=1
pkgdesc="An efficient object serialization library"
url="https://msgpack.org"
arch="all"
license="BSL-1.0"
makedepends="cmake"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/msgpack/msgpack-c/archive/cpp-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cmake -B build . \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_C_FLAGS="$CFLAGS -DNDEBUG" \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS -DNDEBUG" \
		-DCMAKE_VERBOSE_MAKEFILE=TRUE
	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="452adce08d5da2b8ea6db9c90edeab75bf700fcef4aaac831c59c52494899764da54c104f168c817415cda2942edd796566b97e9c5f9a1400176cdd5b2a2f3db  msgpack-c-3.2.1.tar.gz"
